package com.xizi.config;

import org.springframework.ai.chat.client.ChatClient;
import org.springframework.ai.chat.model.ChatModel;
import org.springframework.ai.ollama.OllamaChatModel;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class OllamaConfig {

    @Bean("myOllamaChatModel")
    public ChatClient ollamaChatModel(OllamaChatModel model) {
        return ChatClient.builder(model)
                .defaultSystem("你是小舒的专属答疑工具，主要辅助Java后端开发")
                .build();
    }

}
